{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "# Exercise: Mean & Median Customer Spend"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "Here's some code that will generate some random e-commerce data; just an array of total amount spent per transaction. Select the code block, and hit \"play\" to execute it:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD8CAYAAAB5Pm/hAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAEntJREFUeJzt3W2sVdl93/HvL9ieVBM3HjIUER4KlogjRorH7tW0VWwr\nDnVmHKdm2kgjrCai7Ui0Eo1stVUCtdTmDRJuVat90UlKYzcosU3Iw2hQk6bBJG5UqTZmJtgeGFOu\nPYMGxJMnjZyHihby74u7cA6YyzmHew/nsOb7ka722mvvfc//Lh39zr7r7r1vqgpJUr++Y9oFSJIm\ny6CXpM4Z9JLUOYNekjpn0EtS5wx6SeqcQS9JnTPoJalzBr0kde4N0y4A4OGHH66NGzdOuwxJuq88\n//zz36iqVcP2m4mg37hxI8ePH592GZJ0X0lydpT9nLqRpM4Z9JLUOYNekjpn0EtS5wx6SeqcQS9J\nnRsa9EneluTEwNc3k3wkycokR5KcacuHBo7Zk2Q+yekkj0/2R5Ak3cnQoK+q01X1aFU9Cvw14M+A\nZ4HdwNGq2gwcbesk2QJsBx4BngCeSbJiQvVLkoYYd+pmK/C1qjoLbAMOtP4DwJOtvQ04WFVXq+pl\nYB54bDmKlSSNb9w7Y7cDn2nt1VV1obUvAqtbey3w+YFjzrW+myTZCewE2LBhw5hlSHdv4+7fvG3/\nK/s+cI8rke6Nkc/ok7wJ+CDwq7duq6oCapwXrqr9VTVXVXOrVg19VIMk6S6NM3XzfuCFqrrU1i8l\n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sNgYD32Ex7Ql+fvAjwF/r31I0aY+Xmvt51mY6/6+qRV5izu8N+6H8X4D8HeBX7nRN+vjPaiboG/z\nZ58AXqqqjw/0rxnY7e8AL9567DQleTDJm2+0WfhD24ssPDJiR9ttB/DcdCoc6qaznFkf71ssNsaH\nge1JHkiyCdgMHJtCfbeV5Angp4EPVtWfDfSvysL/giDJW1mo++vTqfLb3eG9MdPj3fwt4KtVde5G\nx6yP902m/dfg5foC3sXCr95fBk60rx8Ffgn4Sus/DKyZdq231P1WFq44+BJwEvho6/8e4ChwBvgs\nsHLatd6m9geB14DvHuibyfFm4cPoAvD/WJgDfvpOYwx8lIUztNPA+2es7nkW5rRvvM9/vu374+09\ndAJ4AfjbM1b3ou+NWR7v1v+LwD++Zd+ZGe9hX94ZK0md62bqRpJ0ewa9JHXOoJekzhn0ktQ5g16S\nOmfQS1LnDHpJ6pxBL0md+/+W9ZWG2J26yQAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x19a827d6160>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "%matplotlib inline\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "incomes = np.random.normal(100.0, 20.0, 10000)\n",
    "\n",
    "plt.hist(incomes, 50)\n",
    "plt.show()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "Now, find the mean and median of this data. In the code block below, write your code, and see if your result makes sense:"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "deletable": true,
    "editable": true
   },
   "source": [
    "This is pretty much the world's easiest assignment, but we're just trying to get your hands on iPython and writing code with numpy to get you comfortable with it.\n",
    "\n",
    "Try playing with the code above to generate different distributions of data, or add outliers to it to see their effect."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false,
    "deletable": true,
    "editable": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
